package org.col.dspace.tagger.model;

import java.io.IOException;
import java.io.InputStream;
import java.sql.SQLException;
import java.util.ArrayList;

import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.util.PDFTextStripper;
import org.dspace.authorize.AuthorizeException;
import org.dspace.content.Bitstream;

public class TagGeneratorPDF extends AbstractTagGenerator{

	private Bitstream bitStream;
	
	public TagGeneratorPDF(Bitstream is){
		super(is);
	}

	@Override
	protected String retrieveText(InputStream istream) throws IOException {
		
		PDFTextStripper pdftotext = new PDFTextStripper();

		PDDocument pdfdoc= PDDocument.load(istream);
		String text=pdftotext.getText(pdfdoc);
		return text;
	
	}


}
